<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>dinocap2 log</title>
<style type="text/CSS">
<!--
.page a:link {
	color: #0000FF;
	text-decoration: none;
}

.page a:visited {
	text-decoration: none;
	color: #0000FF;
}

.page a:hover {
	text-decoration: none;
	color: #0000FF;
}

.page a:active {
	text-decoration: none;
	color: #0000FF;
}

.page {
	color: #0000FF;
}
-->
</style>
</head>
<body>
	<div>
		<ul>
			<li>
				<form name="form" action="search.php" method="post">
					<input type="text" name="search_text" size="20"> <input
						type="submit" value="搜索">
				
				</form>
			</li>
			<li><a href="/log/dinocap2/tocsv.php" target=_blank>导出为Excel</a> <!--   <a href="/log/dinocap2/role2.php" target=_blank>角色2</a>
	                <a href="/log/dinocap2/role3.php" target=_blank>角色3</a>
	                <a href="/log/dinocap2/role4.php" target=_blank>角色4</a>
	                <a href="/log/dinocap2/role5.php" target=_blank>角色5</a>-->
		
		</ul>
	</div>

	<table width="1450" height="103" border="0" align="center"
		cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
		<tr>
			<th width="50" height="38" bgcolor="#E3E3E3" scope="col">ID</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">是否破解</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">注册日期</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">注册时间</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">存档</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player1角色等级</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player2等级</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player3等级</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player4等级</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player5等级</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player1总经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player2总经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player3总经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player4总经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player5总经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player1今天获得经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player2今天获得经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player3今天获得经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player4今天获得经验</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">player5今天获得经验</th>
			<!--
<th width="50" bgcolor="#E3E3E3" scope="col">武器等级</th>
<th width="50" bgcolor="#E3E3E3" scope="col">今日武器升级次数</th>
<th width="50" bgcolor="#E3E3E3" scope="col">今日升级武器种类</th> 
<th width="50" bgcolor="#E3E3E3" scope="col">今天武器消费金钱</th> 
<th width="50" bgcolor="#E3E3E3" scope="col">今日子弹购买次数</th> 
<th width="50" bgcolor="#E3E3E3" scope="col">今日子弹消费金钱</th>-->
			<th width="50" bgcolor="#E3E3E3" scope="col">总游戏时间</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">今日游戏时间</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">今日登陆次数</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">总金钱获得</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">现有金钱</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">今天获得金钱game</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">今天获得金钱IAP</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">今天消费</th>
			<th width="50" bgcolor="#E3E3E3" scope="col">deviceid</th>
		</tr>
		
<?php 

   # $mysql_server_name="192.168.0.185"; //数据库服务器名称
   
   # $mysql_username="root"; // 连接数据库用户名
   # $mysql_password="root"; // 连接数据库密码
   # $mysql_database="kingdom4"; // 数据库的名字
 
$link=MySQL_connect('localhost','root','root'); 
mysql_select_db('dinocap2'); 
mysql_query('set names utf-8'); 
//var_dump($link);
$Page_size=50; 

$result=mysql_query('select id,firstlogindata,whatday,isjailbreak,createdate,player1Level,player2Level,player3Level,player4Level,player5Level,player1TotalExp,player2TotalExp,player3TotalExp,player4TotalExp,player5TotalExp,player1DayExp,player2DayExp,player3DayExp,player4DayExp,player5DayExp,nowMoney,dayGetMoney,dayIapMoney,dayUsedMoney,deviceid,totalMoney,dayPlayTime,dayTotalTime,totalTime from dinocap2hd  order by id desc'); 
//var_dump($result);
$count = mysql_num_rows($result); 
$page_count = ceil($count/$Page_size); 

$init=1; 
$page_len=7; 
$max_p=$page_count; 
$pages=$page_count; 

//判断当前页码 
if(empty($_GET['page'])||$_GET['page']<0){ 
$page=1; 
}else { 
$page=$_GET['page']; 
} 

$offset=$Page_size*($page-1); 
$sql="select id,firstlogindata,whatday,isjailbreak,createdate,player1Level,player2Level,player3Level,player4Level,player5Level,player1TotalExp,player2TotalExp,player3TotalExp,player4TotalExp,player5TotalExp,player1DayExp,player2DayExp,player3DayExp,player4DayExp,player5DayExp,nowMoney,dayGetMoney,dayIapMoney,dayUsedMoney,deviceid,totalMoney,dayPlayTime,dayTotalTime,totalTime from  dinocap2hd  order by id desc limit $offset,$Page_size"; 
$result=mysql_query($sql,$link); 
while ($row=mysql_fetch_array($result)) { 
?> 
<tr> 
<td bgcolor="#E0EEE0" height="25px"><div align="center"> 
<?php echo $row['id'].""?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['isjailbreak']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo substr($row['firstlogindata'],0,10)?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo substr($row['firstlogindata'],10,20)?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['whatday']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player1Level']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player2Level']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player3Level']?> 
</div></td> 

<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player4Level']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player5Level']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player1TotalExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player2TotalExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player3TotalExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player4TotalExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player5TotalExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player1DayExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player2DayExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player3DayExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player4DayExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['player5DayExp']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['totalTime']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['dayTotalTime']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['dayPlayTime']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['totalMoney']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['nowMoney']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['dayGetMoney']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['dayIapMoney']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['dayUsedMoney']?> 
</div></td> 
<td bgcolor="#E0EEE"><div align="center"> 
<?php echo $row['deviceid']?> 
</div></td> 
</tr> 

<?php 
} 
$page_len = ($page_len%2)?$page_len:$pagelen+1;//页码个数 
$pageoffset = ($page_len-1)/2;//页码个数左右偏移量 

$key='<div class="page">'; 
$key.="<span>$page/$pages</span> "; //第几页,共几页 
if($page!=1){ 
$key.="<a href=\"".$_SERVER['PHP_SELF']."?page=1\">第一页</a> "; //第一页 
$key.="<a href=\"".$_SERVER['PHP_SELF']."?page=".($page-1)."\">上一页</a>"; //上一页 
}else { 
$key.="第一页 ";//第一页 
$key.="上一页"; //上一页 
} 
if($pages>$page_len){ 
//如果当前页小于等于左偏移 
if($page<=$pageoffset){ 
$init=1; 
$max_p = $page_len; 
}else{//如果当前页大于左偏移 
//如果当前页码右偏移超出最大分页数 
if($page+$pageoffset>=$pages+1){ 
$init = $pages-$page_len+1; 
}else{ 
//左右偏移都存在时的计算 
$init = $page-$pageoffset; 
$max_p = $page+$pageoffset; 
} 
} 
} 
for($i=$init;$i<=$max_p;$i++){ 
if($i==$page){ 
$key.=' <span>'.$i.'</span>'; 
} else { 
$key.=" <a href=\"".$_SERVER['PHP_SELF']."?page=".$i."\">".$i."</a>"; 
} 
} 
if($page!=$pages){ 
$key.=" <a href=\"".$_SERVER['PHP_SELF']."?page=".($page+1)."\">下一页</a> ";//下一页 
$key.="<a href=\"".$_SERVER['PHP_SELF']."?page={$pages}\">最后一页</a>"; //最后一页 
}else { 
$key.="下一页 ";//下一页 
$key.="最后一页"; //最后一页 
} 
$key.='</div>'; 
?> 
<tr> 
<td colspan="21" bgcolor="#E0EEE0"><div align="center"><?php echo $key?></div></td> 
</tr> 
</table>
</body>
</html>

